package com.cqie.tes.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cqie.tes.comm.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@TableName("sys_user") // 解决实体与数据库表的对应问题
@ApiModel(value="SysUser对象",description="用户对象SysUser")
public class SysUser extends BaseEntity { // 继承Model可以采用mybatisplus机制


    @ApiModelProperty(value="用户id",name="id")
    @TableId(type = IdType.AUTO)   // 字段与数据库字段命名相同可以不写字段名
    private Long id;

    @ApiModelProperty(value="昵称",name="name")
    @TableField
    private String name;

    @ApiModelProperty(value="账号",name="account")
    @TableField("account")
    private String username;

    @ApiModelProperty(value="密码",name="password")
    @TableField
    private String password;

    @ApiModelProperty(value="用户状态",name="status")
    @TableField
    private Integer status;
}
